package tmp;

// Generated 04-nov-2009 18:40:40 by Hibernate Tools 3.2.4.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ExpedientType generated by hbm2java
 */
@Entity
@Table(name = "expedient_type", catalog = "fmanzano_gem")
public class ExpedientType implements java.io.Serializable {

	private Integer texId;
	private String texComments;
	private byte[] texDiagram;
	private boolean texEndNoValidated;
	private String texName;
	private boolean texQueries;
	private boolean texWebAvailable;
	private Set<ExpedientTypePhases> expedientTypePhaseses = new HashSet<ExpedientTypePhases>(
			0);
	private Set<Expedient> expedients = new HashSet<Expedient>(0);
	private Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses = new HashSet<ExpedientTypePhaseExpedients>(
			0);
	private Set<Document> documents = new HashSet<Document>(0);

	public ExpedientType() {
	}

	public ExpedientType(boolean texEndNoValidated, String texName,
			boolean texQueries, boolean texWebAvailable) {
		this.texEndNoValidated = texEndNoValidated;
		this.texName = texName;
		this.texQueries = texQueries;
		this.texWebAvailable = texWebAvailable;
	}

	public ExpedientType(String texComments, byte[] texDiagram,
			boolean texEndNoValidated, String texName, boolean texQueries,
			boolean texWebAvailable,
			Set<ExpedientTypePhases> expedientTypePhaseses,
			Set<Expedient> expedients,
			Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses,
			Set<Document> documents) {
		this.texComments = texComments;
		this.texDiagram = texDiagram;
		this.texEndNoValidated = texEndNoValidated;
		this.texName = texName;
		this.texQueries = texQueries;
		this.texWebAvailable = texWebAvailable;
		this.expedientTypePhaseses = expedientTypePhaseses;
		this.expedients = expedients;
		this.expedientTypePhaseExpedientses = expedientTypePhaseExpedientses;
		this.documents = documents;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "TEX_ID", unique = true, nullable = false)
	public Integer getTexId() {
		return this.texId;
	}

	public void setTexId(Integer texId) {
		this.texId = texId;
	}

	@Column(name = "TEX_COMMENTS", length = 150)
	public String getTexComments() {
		return this.texComments;
	}

	public void setTexComments(String texComments) {
		this.texComments = texComments;
	}

	@Column(name = "TEX_DIAGRAM")
	public byte[] getTexDiagram() {
		return this.texDiagram;
	}

	public void setTexDiagram(byte[] texDiagram) {
		this.texDiagram = texDiagram;
	}

	@Column(name = "TEX_END_NO_VALIDATED", nullable = false)
	public boolean isTexEndNoValidated() {
		return this.texEndNoValidated;
	}

	public void setTexEndNoValidated(boolean texEndNoValidated) {
		this.texEndNoValidated = texEndNoValidated;
	}

	@Column(name = "TEX_NAME", nullable = false, length = 70)
	public String getTexName() {
		return this.texName;
	}

	public void setTexName(String texName) {
		this.texName = texName;
	}

	@Column(name = "TEX_QUERIES", nullable = false)
	public boolean isTexQueries() {
		return this.texQueries;
	}

	public void setTexQueries(boolean texQueries) {
		this.texQueries = texQueries;
	}

	@Column(name = "TEX_WEB_AVAILABLE", nullable = false)
	public boolean isTexWebAvailable() {
		return this.texWebAvailable;
	}

	public void setTexWebAvailable(boolean texWebAvailable) {
		this.texWebAvailable = texWebAvailable;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "expedientType")
	public Set<ExpedientTypePhases> getExpedientTypePhaseses() {
		return this.expedientTypePhaseses;
	}

	public void setExpedientTypePhaseses(
			Set<ExpedientTypePhases> expedientTypePhaseses) {
		this.expedientTypePhaseses = expedientTypePhaseses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "expedientType")
	public Set<Expedient> getExpedients() {
		return this.expedients;
	}

	public void setExpedients(Set<Expedient> expedients) {
		this.expedients = expedients;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "expedientType")
	public Set<ExpedientTypePhaseExpedients> getExpedientTypePhaseExpedientses() {
		return this.expedientTypePhaseExpedientses;
	}

	public void setExpedientTypePhaseExpedientses(
			Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses) {
		this.expedientTypePhaseExpedientses = expedientTypePhaseExpedientses;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "expedient_type_document", catalog = "fmanzano_gem", joinColumns = { @JoinColumn(name = "TEX_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "DOCU_ID", nullable = false, updatable = false) })
	public Set<Document> getDocuments() {
		return this.documents;
	}

	public void setDocuments(Set<Document> documents) {
		this.documents = documents;
	}

}
